package cn.edu.bjtu.toychange.service.impl;

import cn.edu.bjtu.toychange.entity.TransRecord;
import cn.edu.bjtu.toychange.service.TransRecordService;
import cn.edu.bjtu.toychange.dao.TransRecordDao;

public class TransRecordServiceImpl implements TransRecordService{
	private TransRecordDao transRecordDao;
	
	public TransRecordServiceImpl() {
		transRecordDao = new TransRecordDao();
	}
	
	@Override
	public boolean insertTransRecord(TransRecord transRecord) {
		// TODO Auto-generated method stub
		
		return transRecordDao.saveTransRecord(transRecord);
	}
	
	@Override
	public boolean updateTransRecord(TransRecord transRecord) {
		// TODO Auto-generated method stub
		
		return transRecordDao.saveTransRecord(transRecord);
	}

	@Override
	public TransRecord getTransRecord(int transRecordID) {
		// TODO Auto-generated method stub
		
		return transRecordDao.getTransRecord(transRecordID);
	}

	@Override
	public boolean commentTransaction(int transRecordID, int comment, int userID) {
		// TODO Auto-generated method stub
		return transRecordDao.commentTransaction(transRecordID, comment, userID);
	}
}
